function atlas(t){
	if($('#file-common-attach-dialog').length<=0){
		$(t).dialog({
	        id:'file-common-attach-dialog',
	        url:'atlas.html',
	        maxable: false,
	        mask: true,
	        width: 1000,
	        height: 600,
	        onLoad:function($dialog){
	            $(".attachment_atlas").atlas({
	                'title' : $('.big_img .big_txt').html(),
	                'box_id' : 'atlas',
	                'width' : 1000,
	                'height' : 544,
	                //当前页数，后台读取
	                'curr' : $(t).parent().index()+1,
	                //总页数，后台读取
	                'pages' : $('.attachment_list .attachment_box').length,
	                'img_src' : $(t).find('img').attr('src'),
	                //上一张按钮回调，options=当前参数信息
	                '_prevCallBack' : function(options){
	                    var _index = options.curr-1;
	                    if(_index>0){
	                        options.curr = _index;
	                        options.img_src=$('.attachment_list .attachment_box').eq(_index-1).find('img').attr('src');
	                    }
	                },
	                //下一张按钮回调，options=当前参数信息
	                '_nextCallBack' : function(options){
	                    var _index = options.curr;
	                    if(_index<$('.attachment_list .attachment_box').length){
	                        options.curr = _index+1;
	                        options.img_src=$('.attachment_list .attachment_box').eq(_index).find('img').attr('src');
	                    }
	                }
	            }).createDiv();
	        }
	    });
	}else{
		$(".attachment_atlas").html('');
		 $(".attachment_atlas").atlas({
             'title' : $('.big_img .big_txt').html(),
             'box_id' : 'atlas',
             'width' : 1000,
             'height' : 544,
             //当前页数，后台读取
             'curr' : $(t).parent().index()+1,
             //总页数，后台读取
             'pages' : $('.attachment_list .attachment_box').length,
             'img_src' : $(t).find('img').attr('src'),
             //上一张按钮回调，options=当前参数信息
             '_prevCallBack' : function(options){
                 var _index = options.curr-1;
                 if(_index>0){
                     options.curr = _index;
                     options.img_src=$('.attachment_list .attachment_box').eq(_index-1).find('img').attr('src');
                 }
             },
             //下一张按钮回调，options=当前参数信息
             '_nextCallBack' : function(options){
                 var _index = options.curr;
                 if(_index<$('.attachment_list .attachment_box').length){
                     options.curr = _index+1;
                     options.img_src=$('.attachment_list .attachment_box').eq(_index).find('img').attr('src');
                 }
             }
         }).createDiv();
		
	}
    
}